﻿<%@ Page Title="" Language="C#" MasterPageFile="~/StarSecurityServices.Master" AutoEventWireup="true" CodeBehind="frmDepartmentManager.aspx.cs" Inherits="eProject_SEM3_SecurityServices.WebForm8" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
        .style1
        {}
        .style2
        {
            height: 23px;
        }
        .style3
        {
            width: 204px;
        }
        .style4
        {
            height: 23px;
            width: 204px;
        }
        .style5
        {
            width: 312px;
        }
        .style6
        {
            width: 166px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:MultiView ID="MultiView1" runat="server">
    <asp:View ID="View2" runat="server">
        <asp:GridView ID="grvEmployeeOfDepartment" runat="server" Width="100%">
            <EmptyDataTemplate>
                No Data Now
            </EmptyDataTemplate>
        </asp:GridView>
        <br />
        <asp:Button ID="Button3" runat="server" Text="Back" />
    </asp:View>
    <asp:View ID="View1" runat="server">
        <asp:Panel ID="Panel1" runat="server" GroupingText="New Department">
            <table style="width:53%;">
                <tr>
                    <td class="style3">
                        Department Name</td>
                    <td class="style1">
                        <asp:TextBox ID="txtDepName" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td class="style3">
                        Department Desciption</td>
                    <td class="style1">
                        <asp:TextBox ID="txtDepDescription" runat="server"></asp:TextBox>
                        <asp:Panel ID="Panel3" runat="server">
                        </asp:Panel>
                    </td>
                </tr>
                <tr>
                    <td class="style4">
                        <asp:Button ID="Button1" runat="server" onclick="Button1_Click" 
                            Text="Add New Department" />
                        &nbsp;&nbsp;
                    </td>
                    <td class="style2">
                        <asp:Button ID="Button2" runat="server" Text="Cancel" />
                    </td>
                </tr>
            </table>
        </asp:Panel>
        <asp:Panel ID="Panel2" runat="server" GroupingText="Manager Department">
            <asp:GridView ID="grvDepartment" runat="server" AutoGenerateColumns="False" 
                Width="100%" onrowcommand="grvDepartment_RowCommand" 
                onrowcancelingedit="grvDepartment_RowCancelingEdit" 
                onrowediting="grvDepartment_RowEditing" 
                onrowupdating="grvDepartment_RowUpdating">
                <Columns>
                    <asp:BoundField DataField="departmentId" HeaderText="ID" />
                    <asp:TemplateField HeaderText="Name">
                        <ItemTemplate>
                            <asp:Label ID="Label2" runat="server" Text='<%# Bind("DepartmentName") %>'></asp:Label>
                        </ItemTemplate>
                        <EditItemTemplate>
                            <asp:TextBox ID="DepartmentName" runat="server" Text='<%# Bind("DepartmentName") %>'></asp:TextBox>
                        </EditItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Description">
                        <ItemTemplate>
                            <asp:Label ID="Label3" runat="server" 
                                Text='<%# Bind("DepartmentDescription") %>'></asp:Label>
                        </ItemTemplate>
                        <EditItemTemplate>
                            <asp:TextBox ID="DepartmentDescription" runat="server" 
                                Text='<%# Bind("DepartmentDescription") %>'></asp:TextBox>
                        </EditItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField ShowHeader="False">
                        <ItemTemplate>
                            <asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="False" 
                                CommandName="Edit" Text="Edit"></asp:LinkButton>
                        </ItemTemplate>
                        <EditItemTemplate>
                            <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="True" 
                                CommandName="Update" Text="Update"></asp:LinkButton>
                            &nbsp;<asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="False" 
                                CommandName="Cancel" Text="Cancel"></asp:LinkButton>
                        </EditItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField ShowHeader="False">
                        <ItemTemplate>
                            <asp:LinkButton ID="lbn1" runat="server" CausesValidation="false" 
                                CommandName="EmployeeOfDepartment" CommandArgument='<%# DataBinder.Eval(Container, "RowIndex") %>' Text="EmployeeManager"></asp:LinkButton>
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
            </asp:GridView>
        </asp:Panel>
        <asp:Panel ID="Panel4" runat="server" GroupingText="Function Of Department">
            
            <table style="width:100%;">
                <tr>
                    <td>
                        <asp:Panel ID="Panel5" runat="server" 
                            GroupingText="New Function For Department">
                            <table style="width:50%;">
                                <tr>
                                    <td class="style6">
                                        Department</td>
                                    <td>
                                        <asp:DropDownList ID="ddlDepartment" runat="server">
                                        </asp:DropDownList>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="style6">
                                        Service
                                    </td>
                                    <td>
                                        <asp:DropDownList ID="ddtService" runat="server">
                                        </asp:DropDownList>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="style6">
                                        <asp:Button ID="Button4" runat="server" onclick="Button4_Click" 
                                            Text="Add Function" />
                                    </td>
                                    <td>
                                        <asp:Button ID="Button5" runat="server" Text="Cancel" />
                                    </td>
                                </tr>
                            </table>
                        </asp:Panel>
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Panel ID="Panel6" runat="server" 
                            GroupingText="Manager Function Of Department">
                            <asp:GridView ID="grvFunctionOfDepartment" runat="server">
                            </asp:GridView>
                        </asp:Panel>
                    </td>
                </tr>
            </table>
            
        </asp:Panel>
    </asp:View>
</asp:MultiView>
</asp:Content>
